import post2Portal from 'src/api/common'

export const adminList = (data) => {
  let params = {
    api: '/sys/admin/list',
    methods: 'GET',
    data: data
  }
  return post2Portal(params);
};

export const addAdmin = (data) => {
  let params = {
    api: '/sys/admin/add',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};

export const removeAdmin = (data) => {
  let params = {
    api: '/sys/admin/batch/remove',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};

export const freezeAdmin = (data) => {
  let params = {
    api: '/sys/admin/batch/freeze',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};


export const updateAdmin = (data) => {
  let params = {
    api: '/sys/admin/update',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};


export const getSelectList = () => {
  let params = {
    api: '/sys/role/selectList',
    methods: 'GET',
    data: {}
  }
  return post2Portal(params);
}
